package com.yuncheng.spcyApi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuncheng.spcyApi.dto.SjxdSqrBeanDto;
import com.yuncheng.spcyApi.dto.SpcySjxdJbxxDto;
import com.yuncheng.spcyApi.entity.SpcySjxdJbxx;
import com.yuncheng.spcyApi.vo.common.OrderItemVo;
import com.yuncheng.spcyApi.vo.flow.SpcySjxdFlowVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author hua
 */
public interface SpcySjxdJbxxMapper extends BaseMapper<SpcySjxdJbxx> {

    /** 数据修订-待办流程 */
    Page<SpcySjxdFlowVo> flowDbJobPage(Page<SpcySjxdFlowVo> page,
                                     @Param("userid") String userid,
                                     @Param("flowVo") SpcySjxdFlowVo flowVo,
                                     @Param("orderBean") OrderItemVo orderItemVo);

    /** 数据修订-已办流程 */
    Page<SpcySjxdFlowVo> flowYbJobPage(Page<SpcySjxdFlowVo> page,
                                     @Param("userid") String userid,
                                     @Param("flowVo") SpcySjxdFlowVo flowVo,
                                     @Param("orderBean") OrderItemVo orderItemVo);

    /** 查询申请事项id-根据修订基本信息id */
    String selectXdSqsxIdById(@Param("id") String id);

    /** 查询修订数据基本信息-根据修订基本信息id */
    SpcySjxdJbxxDto selectCommonJbxxById(@Param("id") String id);

    /** 查询当前事项是否存在未办结的数据修订流程 */
    List<SpcySjxdJbxx> selectSjxdByFlcztAndFsqsxid(@Param("flczt") String flczt, @Param("sqsxid") String sqsxid);

    /** 查询修订申请人信息 */
    SjxdSqrBeanDto selectSjxdSqrBeanById(@Param("id") String id);
}
